;
var db = require("../../javascript/mysql");
var mysql = new db.mysqlClient("accident");
function genProductInfo() {
    plan = {
        "planA": {
            "name": "个人驾乘意外险",
            "company": "锦泰保险",
            "year": "18-65",
            "days": "1y",
            "people_count": "1",
            "accident_death": "250000",
            "myselfDriver": "250000",
            "accident_medical": "10000",
            "accident_hospital": "",
            "price": "100.00"
        },
        "planB": {
            "name": "个人驾乘意外险",
            "company": "锦泰保险",
            "year": "18-65",
            "days": "1y",
            "people_count": "1",
            "accident_death": "500000",
            "myselfDriver": "500000",
            "accident_medical": "50000",
            "accident_hospital": "9000",
            "price": "180.00"

        },
        "planC": {
            "name": "个人驾乘意外险",
            "company": "锦泰保险",
            "year": "18-65",
            "days": "1y",
            "people_count": "1",
            "accident_death": "500000",
            "myselfDriver": "500000",
            "accident_medical": "20000",
            "accident_hospital": "",
            "price": "200.00"

        }
    }
    for (k in plan){
        data = plan[k]
        console.log( data );
        mysql.insertData( data );
    }
    mysql.close();

}
